
#pragma once

#include "hge.h"
#include "hgegui.h"
#include "hgecolor.h"

#define GetInteger(gui, id) ((IntegerItem*)gui->GetCtrl(id))

class IntegerItem : public hgeGUIObject
{
public:
	
	// Constructor
	IntegerItem(int _id, float x, float y, int initialValue = 0, int _min = 0, int _max = 10000, DWORD _textColor = 0xFFFFFFFF);

	// Integer value
	int value;
	int min, max;
	bool decreasedLast;

protected:

	// For updating the screen
	void Render();

	// Mouse button
	bool MouseLButton(bool bDown);

	// Quads for rendering
	hgeQuad buttonL, buttonR;
	DWORD textColor;
};